package cn.tedu.spring.scope;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestOrders {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.spring.scope");
        //第1次获取对象
        Orders orders1 = context.getBean(Orders.class);
        System.out.println(orders1);
        //第2次获取对象
        Orders orders2 = context.getBean(Orders.class);
        System.out.println(orders2);
    }
}
